package com.yqya.springboot.distributedlock.mysql.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yqya.springboot.distributedlock.mysql.domain.LockInfo;

/**
 * 锁信息Mapper
 *
 * @author Kevin
 * @date 2019-08-03
 */
@Mapper
public interface LockInfoMapper extends BaseMapper<LockInfo> {

    /**
     * 根据锁标识、删除标识查找锁信息
     *
     * @param tag
     * @param flag
     * @return
     */
    LockInfo findByTagWithLock(@Param("tag") String tag, @Param("flag") Integer flag);

}
